package com.xcm.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xcm.dao.DeviceUpgradeMapper;
import com.xcm.model.TbDeviceUpgrade;
import com.xcm.service.DeviceUpgradeService;

/**
 * 终端升级Service实现类
 */
@Service(value = "deviceUpgradeService")
public class DeviceUpgradeServiceImpl implements DeviceUpgradeService {
	@Autowired
	private DeviceUpgradeMapper deviceUpgradeMapper;

	/**
	 * 通过对应机型获取终端升级
	 * getDeviceUpgradeByModel
	 *
	 * @param model 对应机型
	 * @return TbDeviceUpgrade
	 */
	@Override
	public TbDeviceUpgrade getDeviceUpgradeByModel(String model) {
		return deviceUpgradeMapper.getDeviceUpgradeByModel(model);
	}

	/**
	 * 通过mac取终端升级
	 * getDeviceUpgradeByMac
	 *
	 * @param mac mac地址
	 * @return TbDeviceUpgrade
	 */
	@Override
	public TbDeviceUpgrade getDeviceUpgradeByMac(String mac) {
		return deviceUpgradeMapper.getDeviceUpgradeByMac(mac);
	}

	@Override
	public TbDeviceUpgrade getDeviceUpgradeById(Long id) {
		return deviceUpgradeMapper.getDeviceUpgradeById(id);
	}

}
